home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
M2Crypto
/
SSL
/
Cipher.pyo
(
.txt
)
< prev
next >
Wrap
Python Compiled Bytecode
|
2008-10-13
|
2KB
|
59 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
from M2Crypto import m2
class Cipher:
def __init__(self, cipher):
self.cipher = cipher
def __len__(self):
return m2.ssl_cipher_get_bits(self.cipher)
def __repr__(self):
return '%s-%s' % (self.name(), len(self))
def __str__(self):
return '%s-%s' % (self.name(), len(self))
def version(self):
return m2.ssl_cipher_get_version(self.cipher)
def name(self):
return m2.ssl_cipher_get_name(self.cipher)
class Cipher_Stack:
def __init__(self, stack):
self.stack = stack
def __len__(self):
return m2.sk_ssl_cipher_num(self.stack)
def __getitem__(self, idx):
if idx <= idx:
pass
elif not idx < m2.sk_ssl_cipher_num(self.stack):
raise IndexError('index out of range')
v = m2.sk_ssl_cipher_value(self.stack, idx)
return Cipher(v)
def __iter__(self):
for i in xrange(m2.sk_ssl_cipher_num(self.stack)):
yield self[i]